Hi,
i am using bootstrap modal and in modal i am using dropdownlist. But When
i click dropdownlist the modal is going close. i could not complete my
entry form.
<asp:UpdatePanel ID="upMain" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:PostBackTrigger ControlID="bSave" />
<asp:PostBackTrigger ControlID="bNewComment" />
<asp:PostBackTrigger ControlID="btnShowPopup" />
<asp:PostBackTrigger ControlID="ddlEditTypeOfLand" />
</Triggers>
<ContentTemplate>
<asp:Button ID="btnShowPopup" runat="server" Text="Open Modal" class="btn btn-primary btn-lg" />
<div id="myModal" class="modal fade" data-backdrop="static" data-keyboard="false"
role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">
Confirmation</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-6 form-group">
<b>Comments</b>
<asp:Button ID="bNewComment" CssClass="btn btn-info" Text="Add Comment" runat="server"
OnClick="bNewComment_Click" OnClientClick="showComment();" />
</div>
</div>
<div class="row" id="dComment" runat="server" style="display: none;">
<div class="col-sm-6 form-group">
<b>Comments</b>
<asp:TextBox ID="tbComment" TextMode="MultiLine" Width="500px" runat="server" placeholder="Enter Comments.."
class="form-control"></asp:TextBox>
</div>
</div>
<div class="col-sm-5 form-group">
<b>Type Of Land</b><span style="color: Red; font-weight: bolder; font-size: medium;">*</span>
<asp:DropDownList ID="ddlEditTypeOfLand" AutoPostBack="true" runat="server" class="form-control"
OnSelectedIndexChanged="ddlEditTypeOfLand_SelectedIndexChanged">
<asp:ListItem Value="0" Selected="True"><---Select---></asp:ListItem>
<asp:ListItem Value="1">Wasted Land</asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="bClose" runat="server" CssClass="btn btn-primary" data-dismiss="modal"
Text="Close" />
<asp:Button ID="bSave" runat="server" CssClass="btn btn-primary" Text="Save" OnClick="bSave_Click" />
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
Code behind
=========
protected void ddlEditTypeOfLand_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
this.GetCustomerList();
}
catch (Exception ex)
{
throw ex;
}
}
Can you answer this question?
Answer
0 Answers